import 'package:flutter/material.dart';
import 'package:im_flutter_sdk/im_flutter_sdk.dart';

class ConversationItem extends StatelessWidget {
  final EMConversation conversation;

  const ConversationItem({Key key, this.conversation}) : super(key: key);
  @override
  Widget build(BuildContext context) {
    return ListTile(
      leading: CircleAvatar(
        backgroundImage: AssetImage('lib/assets/images/default_avatar.png'),
      ),
      trailing: Icon(Icons.keyboard_arrow_right),
      subtitle: Text('${conversation.latestMessage.body}'),
      title: Text('${conversation.id}'),
    );
  }
}
